<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreatePlanesTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreatePlanesLabel_id}" for="id" />
                    <h:inputText id="id" value="#{planesController.selected.id}" title="#{bundle.CreatePlanesTitle_id}" required="true" requiredMessage="#{bundle.CreatePlanesRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreatePlanesLabel_nombre}" for="nombre" />
                    <h:inputText id="nombre" value="#{planesController.selected.nombre}" title="#{bundle.CreatePlanesTitle_nombre}" required="true" requiredMessage="#{bundle.CreatePlanesRequiredMessage_nombre}"/>
                    <h:outputLabel value="#{bundle.CreatePlanesLabel_precio}" for="precio" />
                    <h:inputText id="precio" value="#{planesController.selected.precio}" title="#{bundle.CreatePlanesTitle_precio}" required="true" requiredMessage="#{bundle.CreatePlanesRequiredMessage_precio}"/>
                    <h:outputLabel value="#{bundle.CreatePlanesLabel_horas}" for="horas" />
                    <h:inputText id="horas" value="#{planesController.selected.horas}" title="#{bundle.CreatePlanesTitle_horas}" />
                    <h:outputLabel value="#{bundle.CreatePlanesLabel_dias}" for="dias" />
                    <h:inputText id="dias" value="#{planesController.selected.dias}" title="#{bundle.CreatePlanesTitle_dias}" />
                    <h:outputLabel value="#{bundle.CreatePlanesLabel_meses}" for="meses" />
                    <h:inputText id="meses" value="#{planesController.selected.meses}" title="#{bundle.CreatePlanesTitle_meses}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{planesController.create}" value="#{bundle.CreatePlanesSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{planesController.prepareList}" value="#{bundle.CreatePlanesShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreatePlanesIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
